package com.Common;

public enum CodeMsg {

    nonData("没有查找到数据", 1001),
    fail("失败", 1002),
    success("成功", 0),
    NoPermission("没有权限", 1003),
    pwd_is_wrong("密码错误", 1004),
    user_is_exist("用户不存在", 1005),
    userName_is_empty("用户名为空", 1006),
    param_is_empty("参数为空", 1007),
    authentication_is_fail("认证失败", 9999);
    // 成员变量
    private String name;
    private int index;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    // 构造方法
    private CodeMsg(String name, int index) {
        this.name = name;
        this.index = index;
    }

    //覆盖方法
    @Override
    public String toString() {
        return this.index + "_" + this.name;
    }

}
